﻿<Application
    x:Class="XamlWatch.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:XamlWatch">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ms-appx:///Shared/Styles/AppBarHint.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <DataTemplate x:Name="Watch">
                <Viewbox>
                    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="500" Height="768" UseLayoutRounding="True">
                        <Path Width="397" Height="701.216" Canvas.Left="59.8" Canvas.Top="27.4167" Stretch="Fill" Data="F1 M 128.712,583.633C 119.084,583.633 111.279,580.215 111.279,575.999L 111.279,507.112C 78.9958,473.281 59.1725,427.455 59.1725,377C 59.1725,328.09 77.8003,283.531 108.348,250.03L 108.348,180.051C 108.348,175.835 117.788,172.417 129.432,172.417L 153.349,172.417L 153.349,53.4609C 153.349,48.6501 161.422,44.7501 171.38,44.7501L 199.349,44.7501L 199.349,42.4167C 199.349,34.1324 206.064,27.4167 214.349,27.4167L 278.349,27.4167C 286.633,27.4167 293.349,34.1324 293.349,42.4167L 293.349,44.75L 320.381,44.75C 330.765,44.75 339.183,48.65 339.183,53.4609L 339.183,172.417L 366.978,172.417C 376.48,172.417 384.183,175.835 384.183,180.051L 384.183,247.011C 403.323,267.105 418.072,291.42 426.892,318.417L 445.348,318.417C 448.109,318.417 450.348,320.656 450.348,323.417L 450.348,344.5L 451.432,344.5C 454.193,344.5 456.432,346.739 456.432,349.5L 456.432,405.5C 456.432,408.262 454.193,410.5 451.432,410.5L 450.348,410.5L 450.348,429.417C 450.348,432.178 448.109,434.417 445.348,434.417L 427.268,434.417C 418.942,460.482 405.099,484.082 387.113,503.843L 387.113,575.999C 387.113,580.215 380.013,583.633 371.256,583.633L 342.113,583.633L 342.113,702.589C 342.113,707.4 333.994,711.3 323.979,711.3L 296.279,711.3L 296.279,713.633C 296.279,721.917 289.563,728.633 281.279,728.633L 217.279,728.633C 208.994,728.633 202.279,721.917 202.279,713.633L 202.279,711.3L 173.02,711.3C 163.774,711.3 156.279,707.4 156.279,702.589L 156.279,583.633L 128.712,583.633 Z ">
                            <Path.Fill>
                                <SolidColorBrush Color="{Binding SelectedColor.Color}"/>
                            </Path.Fill>
                        </Path>
                        <Path Width="45.0109" Height="89.3802" Canvas.Left="111.93" Canvas.Top="494.253" Stretch="Fill" Fill="#80000000" Data="F1 M 121.93,583.633L 156.941,583.633C 156.941,583.633 156.902,580.215 156.902,501.886C 156.902,497.67 152.425,494.253 146.902,494.253L 121.93,494.253C 116.407,494.253 111.93,497.67 111.93,501.886L 111.93,575.999C 111.93,580.215 116.407,583.633 121.93,583.633 Z "/>
                        <Path Width="45.0109" Height="89.3802" Canvas.Left="342.754" Canvas.Top="494.253" Stretch="Fill" Fill="#80000000" Data="F1 M 377.764,583.633L 342.754,583.633C 342.754,583.633 342.792,580.215 342.792,501.886C 342.792,497.67 347.269,494.253 352.792,494.253L 377.764,494.253C 383.287,494.253 387.764,497.67 387.764,501.886L 387.764,575.999C 387.764,580.215 383.287,583.633 377.764,583.633 Z "/>
                        <Path Width="45.0108" Height="89.3802" Canvas.Left="109" Canvas.Top="172.417" Stretch="Fill" Fill="#80000000" Data="F1 M 119,172.417L 154.011,172.417C 154.011,172.417 153.972,175.834 153.972,254.163C 153.972,258.379 149.495,261.797 143.972,261.797L 119,261.797C 113.477,261.797 109,258.379 109,254.163L 109,180.05C 109,175.834 113.477,172.417 119,172.417 Z "/>
                        <Path Width="45.0109" Height="89.3802" Canvas.Left="339.824" Canvas.Top="172.417" Stretch="Fill" Fill="#80000000" Data="F1 M 374.835,172.417L 339.824,172.417C 339.824,172.417 339.862,175.834 339.862,254.163C 339.862,258.379 344.339,261.797 349.862,261.797L 374.835,261.797C 380.357,261.797 384.835,258.379 384.835,254.163L 384.835,180.051C 384.835,175.834 380.357,172.417 374.835,172.417 Z "/>
                        <Path Width="45.9743" Height="184.38" Canvas.Left="156.93" Canvas.Top="526.919" Stretch="Fill" Fill="#C03B3B3B" Data="F1 M 166.93,711.3L 202.905,711.3C 202.905,711.3 202.84,707.4 202.84,535.63C 202.84,530.819 198.363,526.919 192.84,526.919L 166.93,526.919C 161.407,526.919 156.93,530.819 156.93,535.63L 156.93,702.589C 156.93,707.4 161.407,711.3 166.93,711.3 Z "/>
                        <Path Width="45.9743" Height="184.38" Canvas.Left="296.79" Canvas.Top="526.919" Stretch="Fill" Fill="#C03B3B3B" Data="F1 M 332.764,711.3L 296.79,711.3C 296.79,711.3 296.855,707.4 296.855,535.63C 296.855,530.819 301.332,526.919 306.855,526.919L 332.764,526.919C 338.287,526.919 342.764,530.819 342.764,535.63L 342.764,702.589C 342.764,707.4 338.287,711.3 332.764,711.3 Z "/>
                        <Path Width="45.9743" Height="184.381" Canvas.Left="154" Canvas.Top="44.7495" Stretch="Fill" Fill="#C03B3B3B" Data="F1 M 164,44.7495L 199.975,44.7495C 199.975,44.7495 199.91,48.6496 199.91,220.419C 199.91,225.23 195.433,229.13 189.91,229.13L 164,229.13C 158.477,229.13 154,225.23 154,220.419L 154,53.4604C 154,48.6496 158.477,44.7495 164,44.7495 Z "/>
                        <Path Width="45.9743" Height="184.38" Canvas.Left="293.86" Canvas.Top="44.7497" Stretch="Fill" Fill="#C03B3B3B" Data="F1 M 329.834,44.7497L 293.86,44.7497C 293.86,44.7497 293.925,48.6497 293.925,220.419C 293.925,225.23 298.402,229.13 303.925,229.13L 329.834,229.13C 335.357,229.13 339.834,225.23 339.834,220.419L 339.834,53.4605C 339.834,48.6497 335.357,44.7497 329.834,44.7497 Z "/>
                        <Path Width="94" Height="189.047" Canvas.Left="202.93" Canvas.Top="539.586" Stretch="Fill" Data="F1 M 217.93,728.633L 281.93,728.633C 290.214,728.633 296.93,721.917 296.93,713.633L 296.93,554.586C 296.93,546.302 290.214,539.586 281.93,539.586L 217.93,539.586C 209.646,539.586 202.93,546.302 202.93,554.586L 202.93,713.633C 202.93,721.917 209.646,728.633 217.93,728.633 Z ">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.5">
                                    <GradientStop Color="Black" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path Width="94" Height="189.047" Canvas.Left="200" Canvas.Top="27.4165" Stretch="Fill" Data="F1 M 215,27.4165L 279,27.4165C 287.284,27.4165 294,34.1323 294,42.4164L 294,201.463C 294,209.748 287.284,216.463 279,216.463L 215,216.463C 206.716,216.463 200,209.748 200,201.463L 200,42.4164C 200,34.1323 206.716,27.4165 215,27.4165 Z ">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.5">
                                    <GradientStop Color="Black" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path Width="44" Height="116" Canvas.Left="407" Canvas.Top="318.417" Stretch="Fill" Fill="#803B3B3B" Data="F1 M 412,318.417L 446,318.417C 448.762,318.417 451,320.655 451,323.417L 451,429.417C 451,432.178 448.762,434.417 446,434.417L 412,434.417C 409.239,434.417 407,432.178 407,429.417L 407,323.417C 407,320.655 409.239,318.417 412,318.417 Z "/>
                        <Ellipse Width="315.212" Height="315.212" Canvas.Left="90.894" Canvas.Top="219.394" Stretch="Fill">
                            <Ellipse.Fill>
                                <ImageBrush ImageSource="{Binding SelectedFace.Path}" Stretch="UniformToFill" />
                            </Ellipse.Fill>
                        </Ellipse>
                        <Rectangle Width="43" Height="27" Canvas.Left="337.5" Canvas.Top="363.5" Stretch="Fill" Fill="#FFA1A1A1"/>
                        <TextBlock FontFamily="Segoe UI" FontSize="15.6932" Canvas.Left="0" Canvas.Top="0" TextAlignment="Center" Width="25">
                            <TextBlock.RenderTransform>
                                <TransformGroup>
                                    <MatrixTransform Matrix="1.33333,0,0,1.33333,346.561,361.403"/>
                                </TransformGroup>
                            </TextBlock.RenderTransform>
		                        <Run Text="{Binding Day}" Foreground="#FF000000"/>
                        </TextBlock>
                        <Path Width="33.0834" Height="66" Canvas.Left="424" Canvas.Top="344.5" Stretch="Fill" Fill="#FFA9A9A9" Data="F1 M 429,344.5L 452.083,344.5C 454.845,344.5 457.083,346.739 457.083,349.5L 457.083,405.5C 457.083,408.262 454.845,410.5 452.083,410.5L 429,410.5C 426.239,410.5 424,408.262 424,405.5L 424,349.5C 424,346.739 426.239,344.5 429,344.5 Z "/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="350.94" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,353.44L 451.679,353.44"/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="370.447" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,372.947L 451.679,372.947"/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="389.955" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,392.455L 451.679,392.455"/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="360.693" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,363.193L 451.679,363.193"/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="380.201" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,382.701L 451.679,382.701"/>
                        <Path Width="26.1673" Height="5" Canvas.Left="428.012" Canvas.Top="399.709" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#80313131" Data="F1 M 430.512,402.209L 451.679,402.209"/>
                        <Path Width="13.648" Height="13.2271" Canvas.Left="234.722" Canvas.Top="260.492" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 234.782,262.296L 248.37,260.492L 248.31,273.539L 234.722,273.719L 234.782,262.296 Z "/>
                        <Path Width="18.2174" Height="16.0529" Canvas.Left="249.993" Canvas.Top="257.546" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 250.053,260.131L 249.993,273.599L 268.211,273.419L 268.211,257.546L 250.053,260.131 Z "/>
                        <Path Width="13.7682" Height="13.2872" Canvas.Left="234.662" Canvas.Top="275.102" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 234.722,275.102L 248.37,275.162L 248.43,288.389L 234.662,286.405L 234.722,275.102 Z "/>
                        <Path Width="18.3376" Height="16.0529" Canvas.Left="249.933" Canvas.Top="275.162" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 250.053,275.162L 268.211,275.282L 268.271,291.215L 249.933,288.509L 250.053,275.162 Z "/>
                        <Grid Width="377" Height="377" Canvas.Left="59.8238" Canvas.Top="188.5">
                            <Grid RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <CompositeTransform Rotation="{Binding MinutesAngle}"/>
                                </Grid.RenderTransform>
                                <Line Stroke="White" StrokeThickness="10" X1="5" Y1="60" X2="5" Y2="185" VerticalAlignment="Top" HorizontalAlignment="Center" />
                            </Grid>
                            <Grid RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <CompositeTransform Rotation="{Binding HoursAngle}"/>
                                </Grid.RenderTransform>
                                <Line Stroke="White" StrokeThickness="10" X1="5" Y1="100" X2="5" Y2="185" VerticalAlignment="Top" HorizontalAlignment="Center" />
                            </Grid>
                            <Grid RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <CompositeTransform Rotation="{Binding SecondsAngle}"/>
                                </Grid.RenderTransform>
                                <Line Stroke="IndianRed" StrokeThickness="2" X1="1" Y1="60" X2="1" Y2="185" VerticalAlignment="Top" HorizontalAlignment="Center" />
                                <Ellipse Fill="IndianRed" Height="10" Width="10" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,60,0,0" />
                            </Grid>
                            <Ellipse Height="20" Width="20" >
                                <Ellipse.Fill>
                                    <SolidColorBrush Color="{Binding SelectedColor.Color}"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Ellipse Fill="Black" Height="20" Width="20" Opacity=".5" />
                        </Grid>
                        <Path Opacity=".75" Width="356.667" Height="356.667" Canvas.Left="69.6992" Canvas.Top="198.716" Stretch="Fill" Data="F1 M 248.033,198.716C 346.523,198.716 426.366,278.559 426.366,377.049C 426.366,475.54 346.523,555.383 248.033,555.383C 149.542,555.383 69.6992,475.54 69.6992,377.049C 69.6992,278.559 149.542,198.716 248.033,198.716 Z M 248.032,235.613C 169.919,235.613 106.596,298.936 106.596,377.049C 106.596,455.163 169.919,518.486 248.032,518.486C 326.146,518.486 389.469,455.163 389.469,377.049C 389.469,298.936 326.146,235.613 248.032,235.613 Z ">
                            <Path.Fill>
                                <SolidColorBrush Color="{Binding SelectedColor.Color}"/>
                            </Path.Fill>
                        </Path>
                        <Path Fill="Black" Width="377" Height="377" Canvas.Left="59.8238" Canvas.Top="188.5" Stretch="Fill" Data="F1 M 248.324,188.5C 352.429,188.5 436.824,272.895 436.824,377C 436.824,481.106 352.429,565.5 248.324,565.5C 144.218,565.5 59.8238,481.106 59.8238,377C 59.8238,272.895 144.218,188.5 248.324,188.5 Z M 248.324,227.501C 165.757,227.501 98.824,294.434 98.824,377C 98.824,459.567 165.757,526.5 248.324,526.5C 330.89,526.5 397.824,459.567 397.824,377C 397.824,294.434 330.89,227.501 248.324,227.501 Z " />
                        <Path Width="377" Height="377" Canvas.Left="59.8238" Canvas.Top="188.5" Stretch="Fill" Data="F1 M 248.324,188.5C 352.429,188.5 436.824,272.895 436.824,377C 436.824,481.106 352.429,565.5 248.324,565.5C 144.218,565.5 59.8238,481.106 59.8238,377C 59.8238,272.895 144.218,188.5 248.324,188.5 Z M 248.324,227.501C 165.757,227.501 98.824,294.434 98.824,377C 98.824,459.567 165.757,526.5 248.324,526.5C 330.89,526.5 397.824,459.567 397.824,377C 397.824,294.434 330.89,227.501 248.324,227.501 Z ">
                            <Path.Fill>
                                <SolidColorBrush Color="{Binding SelectedColor.Color}" Opacity=".4"/>
                            </Path.Fill>
                        </Path>
                        <ItemsControl ItemsSource="{Binding Ticks}" Canvas.Left="98" Canvas.Top="228">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <Grid />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Grid RenderTransformOrigin=".5,.5" Width="300" Height="300">
                                        <Grid.RenderTransform>
                                            <RotateTransform Angle="{Binding Angle}" />
                                        </Grid.RenderTransform>
                                        <Line Opacity=".5" X1="0" Y1="-15" X2="0" Y2="0" Stroke="White" StrokeThickness="5" VerticalAlignment="Top" HorizontalAlignment="Center" />
                                    </Grid>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                        <Path Width="88" Height="152.667" Canvas.Left="116.366" Canvas.Top="248.716" Stretch="Fill" Fill="#52FFFFFF" Data="F1 M 116.366,401.383C 117.921,369.16 119.477,336.938 134.144,311.494C 148.81,286.049 176.588,267.383 204.366,248.716C 179.477,269.16 154.588,289.605 139.921,315.049C 125.255,340.494 120.81,370.938 116.366,401.383 Z "/>
                    </Canvas>
                </Viewbox>
            </DataTemplate>

        </ResourceDictionary>
    </Application.Resources>

</Application>
